<?php


/** @see Zead_Html_Filter_Abstract **/
require_once 'Zead/Html/Filter/Abstract.php';

/** @see Zead_Loader **/
require_once 'Zead/Loader.php';


/**
 * @category   Zead
 * @package    Zead_Html
 * @subpackage Zead_Html_Filter
 * @copyright  Copyright (c) 2008 Marcelo Rodrigues Gonzaga 
 * @license    http://www.opensource.org/licenses/bsd-license.php     New BSD License  
 */
class Zead_Html_Filter_Code extends Zead_Html_Filter_Abstract 
{
	public function filter($language = null) {
		if (null === $language) return;

		$className = 'Zead_Html_Filter_Code_'. ucfirst($language);
		//Zead_Loader::loadClass($className);

		require_once str_replace('_', '/', $className) .'.php';
		$object = new $className();
		$object->setHtml($this->html);
		return $object->filter();
	}
}
